<template>
    <div>
        <span v-text="msg"></span>
        <div>
            <button v-on:click="getMsg">获取信息</button>
        </div>
    </div>
</template>

<script>
export default {
    name: 'AppIndex',
    data() {
        return {
            msg: "等待信息"
        }
    },
    methods: {
        getMsg() {
            this.$axios
                .get("/api/admin/hello")
                .then(response => {
                    this.msg = response.data.data
                })
                .catch(response => {
                    console.log(response);
                })
        }
    }
}
</script>

<style scoped>

</style>